public class Reload {
    public static int max(int a, int b){
        int s = a > b ? a : b;
        return s;
    }
    public static double max(double c, double d){
        double s = c > d ? c : d;
        return s;
    }
    public static double max(double a, double b, int c){
        double s = a > b ? a : b;
        if(s > (double)c){
            return s;
        }
        return c;
    }
    public static void main(String[] args) {
        int a = 5, b = 2;
        double c = 2.2, d = 2.3;
        int sum = max(a, b);
        double sum1 = max(c, d);
        double sum2 = max(c, d, a);
        System.out.println(sum + " " + sum1 + " " + sum2);
    }
}
